package com.daixu.xutil.demo.activity;

import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.daixu.xutil.demo.NoSwipeBaseActivity;
import com.daixu.xutil.demo.R;
import com.daixu.xutil.demo.utils.Tools;
import com.zxing.activity.CaptureActivity;

import org.xutils.view.annotation.ContentView;
import org.xutils.view.annotation.Event;

/**
 * Created by yangbo on 2016/2/2.
 */
@ContentView(R.layout.activity_main)
public class MainActivity extends NoSwipeBaseActivity {

    @SuppressLint("ResourceAsColor")
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.setStatusBarTintColor(R.color.red_button_press_color);
        super.onCreate(savedInstanceState);
    }

    @Event(value = R.id.btn_demo)
    private void onDemoClick(View view) {
        Intent intent = new Intent(this, MatchActionBarActivity.class);
        startActivity(intent);
    }

    @Event(value = R.id.btn_image)
    private void onImageClick(View view) {
        Intent intent = new Intent(this, BigImageActivity.class);
        startActivity(intent);
    }

    @Event(value = R.id.btn_zbar)
    private void onZbarClick(View view) {
        Intent intent = new Intent(this, CaptureActivity.class);
        startActivity(intent);
    }

    @Event(value = R.id.btn_market)
    private void onMarketClick(View view) {
        Tools.openAppInMarket(this);
    }

    @Event(value = R.id.btn_gif)
    private void onGifClick(View view) {
        Intent intent = new Intent(this, GifActivity.class);
        startActivity(intent);
    }

    @Event(value = R.id.btn_recyclerView)
    private void onRecyClerClick(View view) {
        Intent intent = new Intent(this, RecyclerViewActivity.class);
        startActivity(intent);
    }

    @Event(value = R.id.btn_listView)
    private void onXListViewClick(View view) {
        Intent intent = new Intent(this, XListViewActivity.class);
        startActivity(intent);
    }
}
